package com.zzl.bonds.ticket.constant.type;

/**
 * @author : gull
 * @date : 2022/2/24 20:06
 */
public enum TicketTypeEnum {
    /**
     * 1 开立中 2 转让中 3 融资中
     */
    TICKET_TYPE_OPEN(1, "开立中", "开立"),
    TICKET_TYPE_TRANSFER(2, "转让中", "转让"),
    TICKET_TYPE_FINANCE(3, "融资中", "融资"),
    ;

    private Integer code;
    private String value;
    private String description;


    TicketTypeEnum(Integer code, String value, String description) {
        this.code = code;
        this.value = value;
        this.description = description;
    }

    public static String getValue(Integer code) {
        for (TicketTypeEnum statusEnum : TicketTypeEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }


    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
